/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 默认颜色按钮组样式 */
.default-colors {
    display: flex;
    gap: 5px;
    margin: 0 10px;
}

.color-btn {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.selected {
    border: 2px solid #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

.color-btn[data-color="#4CAF50"] { background-color: #4CAF50; }
.color-btn[data-color="#2196F3"] { background-color: #2196F3; }
.color-btn[data-color="#FF9800"] { background-color: #FF9800; }
.color-btn[data-color="#9C27B0"] { background-color: #9C27B0; }
.color-btn[data-color="#F44336"] { background-color: #F44336; }
.color-btn[data-color="#00BCD4"] { background-color: #00BCD4; }
.color-btn[data-color="#FFC107"] { background-color: #FFC107; }
.color-btn[data-color="#795548"] { background-color: #795548; }

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
}

/* 标签页样式 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #f0f0f0;
}

.tab-btn.active {
    color: #3498db;
    border-bottom: 3px solid #3498db;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 日期导航 */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.date-nav h2 {
    margin: 0 20px;
    color: #2c3e50;
}

.date-nav button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.date-nav button:hover {
    background-color: #2980b9;
}

/* 输入区域 */
.input-section {
    display: flex;
    margin-bottom: 20px;
}

.input-section input,
.input-section textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    resize: vertical;
}

.input-section textarea {
    min-height: 80px;
}

.work-content {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.input-section button {
    padding: 10px 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.input-section button:hover {
    background-color: #27ae60;
}

/* 待办事项列表 */
.todo-list {
    margin-top: 20px;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.todo-item:hover {
    background-color: #e9ecef;
}

.todo-content {
    flex: 1;
    cursor: pointer;
}

/* 每日工作页面 */
.daily-work-list {
    margin-top: 20px;
}

.work-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.work-item:hover {
    background-color: #e9ecef;
}

.work-content {
    flex: 1;
}

.work-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

/* 标签选择区域 */
.work-tags-selection {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.work-tags-selection h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.work-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.work-tag-item {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.work-tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.work-tag-item.selected {
    border: 2px solid #000;
    font-weight: bold;
}

.selected-tag-display {
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    min-height: 40px;
}

.selected-tag {
    display: flex;
    align-items: center;
}

.selected-tag span {
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 10px;
}

.remove-tag-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #e74c3c;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-tags-message {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    width: 100%;
    padding: 10px;
}

/* 月度看板页面 */
.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.filter-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.filter-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.filter-tag.selected {
    border: 2px solid #000;
    font-weight: bold;
}

/* 日历样式 */
.calendar-section {
    margin-bottom: 30px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.calendar-day.today {
    background-color: #e3f2fd;
    border-color: #2196f3;
    font-weight: bold;
}

.calendar-day.other-month {
    color: #aaa;
    background-color: #fafafa;
}

.record-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 5px;
    gap: 2px;
}

.record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 统计区域 */
.stats-section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.stats-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 月度记录列表 */
.monthly-records-section {
    margin-bottom: 20px;
}

.monthly-records-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.monthly-records-list {
    margin-bottom: 20px;
}

.record-item {
    padding: 10px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 设置页面 */
.tag-management {
    margin-bottom: 30px;
}

.tag-management h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.tag-list {
    margin-top: 20px;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.tag-name {
    flex: 1;
}

.tag-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin: 0 10px;
}

/* 通用按钮样式 */
.delete-btn {
    padding: 5px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 导出按钮 */
#exportBtn {
    background-color: #9b59b6;
}

#exportBtn:hover {
    background-color: #8e44ad;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 0 0 50%;
    }
    
    .date-nav {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .date-nav h2 {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-day {
        padding: 5px;
        font-size: 14px;
    }
}